<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>欢迎界面</title>
<% String name = (String)request.getSession().getAttribute("userName"); %>
<script>
	$(function(){
		nameUser = '<%=name%>';
		if(nameUser == null){
			alert("请您登录！！2秒后自动跳转到登录界面。");
			var url = "${pageContext.request.contextPath }/exam/login";
			setTimeout(function() {
				window.location.href=url;
			}, 2000)
		}
	});
</script>
</head>
<body>
	<div class="dialog">
    	<div class="panel panel-default">
       	 	<p class="panel-heading no-collapse">欢迎</p>
       		<div class="panel-body">
				<%=name%>,使用在线考试系统！！！
			</div>
		</div>
	</div>
</body>
</html>